<?php
//添加栏目，实际上算是一个controller
require "../include/init.php";

//接收数据
$data["cat_name"] = $_POST["cat_name"];
$data["intro"] = $_POST["intro"];

$cateModel = new CateModel();

if ($cateModel->add($data)){
	$res = true;
}else{
	$res = false;
}
?>

<html>
	<?php 
		if ($res) {
			echo "<h1>添加栏目成功！</h1>";			
		}else{
			echo "<h1>添加栏目失败！</h1>";
		}
	?>
</html>